package cn.tedu.ivos.application.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class ApplicationSaveParam {
    @Schema(description = "用车申请表id")
    private Long id;

    @Schema(description = "申请人")
    private Long userId;

    @Schema(description = "申请人姓名")
    private String username;

    @Schema(description = "用车开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @Schema(description = "用车结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @Schema(description = "驾照图片")
    @NotBlank(message = "驾照图片未上传")
    private String imgUrl;

    @Schema(description = "出发地")
    @NotBlank(message = "出发地不能为空")
    private String departureAddr;

    @Schema(description = "目的地")
    @NotBlank(message = "目的地不能为空")
    private String destinationAddr;

    @Schema(description = "用车原因")
    @NotBlank(message = "用车原因不能为空")
    private String reason;

    @Schema(description = "其它备注信息")
    private String remark;

    @Schema(description = "申请表状态 已发起10 撤销20 审核中30 驳回40 已通过50 分配用车60 工单结束70")
    private String status;

    @Schema(description = "分配的车辆id")
    private Long vehicleId;

    @Schema(description = "驳回原因")
    private String rejectReason;

    @Schema(description = "审批人id集合")
    private List<Long> auditUserIdList; //审批人id集合[106,103]

}
